<template>
<div>
    
    <h2>微博------登录中---------</h2>
    {{code}}

</div>
  
</template>

<script>
import axios from "axios";
export default {
  name:"jinweibo",
  data() {
      return {
          code:this.$route.query.code
      }
  }
  ,methods: {
      lalala(){
          axios({
              url:"http://127.0.0.1:8000/weiboo?code="+this.code,
              method:"get",
          }).then(resp=>{
              if(resp.data.code==200){
                  console.log(resp)
                  alert("微博登录成功")
              }else{
                  alert("继续绑定")
                  this.$router.push({"path":"/bind","query":{"uid":resp.data.uid}})
              }
              
          })
      }
  },
  created() {
      this.lalala()
  },
}
</script>

<style>
</style>
